<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /usr/include/i386/_types.h</title>
  </head>
  <body>
    <h1>File: /usr/include/i386/_types.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="k">/*</span>
<a name="2" /><span class="True">       2:</span> <span class="k"> * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.</span>
<a name="3" /><span class="True">       3:</span> <span class="k"> *</span>
<a name="4" /><span class="True">       4:</span> <span class="k"> * @APPLE_OSREFERENCE_LICENSE_HEADER_START@</span>
<a name="5" /><span class="True">       5:</span> <span class="k"> * </span>
<a name="6" /><span class="True">       6:</span> <span class="k"> * This file contains Original Code and/or Modifications of Original Code</span>
<a name="7" /><span class="True">       7:</span> <span class="k"> * as defined in and that are subject to the Apple Public Source License</span>
<a name="8" /><span class="True">       8:</span> <span class="k"> * Version 2.0 (the &apos;License&apos;). You may not use this file except in</span>
<a name="9" /><span class="True">       9:</span> <span class="k"> * compliance with the License. The rights granted to you under the License</span>
<a name="10" /><span class="True">      10:</span> <span class="k"> * may not be used to create, or enable the creation or redistribution of,</span>
<a name="11" /><span class="True">      11:</span> <span class="k"> * unlawful or unlicensed copies of an Apple operating system, or to</span>
<a name="12" /><span class="True">      12:</span> <span class="k"> * circumvent, violate, or enable the circumvention or violation of, any</span>
<a name="13" /><span class="True">      13:</span> <span class="k"> * terms of an Apple operating system software license agreement.</span>
<a name="14" /><span class="True">      14:</span> <span class="k"> * </span>
<a name="15" /><span class="True">      15:</span> <span class="k"> * Please obtain a copy of the License at</span>
<a name="16" /><span class="True">      16:</span> <span class="k"> * http://www.opensource.apple.com/apsl/ and read it before using this file.</span>
<a name="17" /><span class="True">      17:</span> <span class="k"> * </span>
<a name="18" /><span class="True">      18:</span> <span class="k"> * The Original Code and all software distributed under the License are</span>
<a name="19" /><span class="True">      19:</span> <span class="k"> * distributed on an &apos;AS IS&apos; basis, WITHOUT WARRANTY OF ANY KIND, EITHER</span>
<a name="20" /><span class="True">      20:</span> <span class="k"> * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,</span>
<a name="21" /><span class="True">      21:</span> <span class="k"> * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,</span>
<a name="22" /><span class="True">      22:</span> <span class="k"> * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.</span>
<a name="23" /><span class="True">      23:</span> <span class="k"> * Please see the License for the specific language governing rights and</span>
<a name="24" /><span class="True">      24:</span> <span class="k"> * limitations under the License.</span>
<a name="25" /><span class="True">      25:</span> <span class="k"> * </span>
<a name="26" /><span class="True">      26:</span> <span class="k"> * @APPLE_OSREFERENCE_LICENSE_HEADER_END@</span>
<a name="27" /><span class="True">      27:</span> <span class="k"> */</span>
<a name="28" /><span class="Maybe">      28:</span> <span class="f">#</span><span class="n">ifndef</span>    <a href="macros_ref.html#_X0JTRF9JMzg2X19UWVBFU19IX18w"><span class="b">_BSD_I386__TYPES_H_</span></a>
<a name="29" /><span class="Maybe">      29:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_ref.html#_X0JTRF9JMzg2X19UWVBFU19IX18w"><span class="b">_BSD_I386__TYPES_H_</span></a>
<a name="30" /><span class="Maybe">      30:</span> 
<a name="31" /><span class="Maybe">      31:</span> <span class="k">/*</span>
<a name="32" /><span class="Maybe">      32:</span> <span class="k"> * This header file contains integer types.  It&apos;s intended to also contain</span>
<a name="33" /><span class="Maybe">      33:</span> <span class="k"> * flotaing point and other arithmetic types, as needed, later.</span>
<a name="34" /><span class="Maybe">      34:</span> <span class="k"> */</span>
<a name="35" /><span class="Maybe">      35:</span> 
<a name="36" /><span class="Maybe">      36:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="macros_ref.html#_X19HTlVDX19fMA__"><span class="b">__GNUC__</span></a>
<a name="37" /><span class="Maybe">      37:</span> <span class="m">typedef</span> <span class="b">__signed</span> <span class="m">char</span>        <span class="b">__int8_t</span><span class="f">;</span>
<a name="38" /><span class="False">      38:</span> <span class="f">#</span><span class="n">else</span>    <span class="k">/* !__GNUC__ */</span>
<a name="39" /><span class="False">      39:</span> <span class="m">typedef</span> <span class="m">char</span>            <span class="b">__int8_t</span><span class="f">;</span>
<a name="40" /><span class="Maybe">      40:</span> <span class="f">#</span><span class="n">endif</span>    <span class="k">/* !__GNUC__ */</span>
<a name="41" /><span class="Maybe">      41:</span> <span class="m">typedef</span> <span class="m">unsigned</span> <span class="m">char</span>        <span class="b">__uint8_t</span><span class="f">;</span>
<a name="42" /><span class="Maybe">      42:</span> <span class="m">typedef</span>    <span class="m">short</span>            <span class="b">__int16_t</span><span class="f">;</span>
<a name="43" /><span class="Maybe">      43:</span> <span class="m">typedef</span>    <span class="m">unsigned</span> <span class="m">short</span>        <span class="b">__uint16_t</span><span class="f">;</span>
<a name="44" /><span class="Maybe">      44:</span> <span class="m">typedef</span> <span class="m">int</span>            <span class="b">__int32_t</span><span class="f">;</span>
<a name="45" /><span class="Maybe">      45:</span> <span class="m">typedef</span> <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">__uint32_t</span><span class="f">;</span>
<a name="46" /><span class="Maybe">      46:</span> <span class="m">typedef</span> <span class="m">long</span> <span class="m">long</span>        <span class="b">__int64_t</span><span class="f">;</span>
<a name="47" /><span class="Maybe">      47:</span> <span class="m">typedef</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span>    <span class="b">__uint64_t</span><span class="f">;</span>
<a name="48" /><span class="Maybe">      48:</span> 
<a name="49" /><span class="Maybe">      49:</span> <span class="m">typedef</span> <span class="m">long</span>            <span class="b">__darwin_intptr_t</span><span class="f">;</span>
<a name="50" /><span class="Maybe">      50:</span> <span class="m">typedef</span> <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">__darwin_natural_t</span><span class="f">;</span>
<a name="51" /><span class="Maybe">      51:</span> 
<a name="52" /><span class="Maybe">      52:</span> <span class="k">/*</span>
<a name="53" /><span class="Maybe">      53:</span> <span class="k"> * The rune type below is declared to be an ``int&apos;&apos; instead of the more natural</span>
<a name="54" /><span class="Maybe">      54:</span> <span class="k"> * ``unsigned long&apos;&apos; or ``long&apos;&apos;.  Two things are happening here.  It is not</span>
<a name="55" /><span class="Maybe">      55:</span> <span class="k"> * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,</span>
<a name="56" /><span class="Maybe">      56:</span> <span class="k"> * it looks like 10646 will be a 31 bit standard.  This means that if your</span>
<a name="57" /><span class="Maybe">      57:</span> <span class="k"> * ints cannot hold 32 bits, you will be in trouble.  The reason an int was</span>
<a name="58" /><span class="Maybe">      58:</span> <span class="k"> * chosen over a long is that the is*() and to*() routines take ints (says</span>
<a name="59" /><span class="Maybe">      59:</span> <span class="k"> * ANSI C), but they use __darwin_ct_rune_t instead of int.  By changing it</span>
<a name="60" /><span class="Maybe">      60:</span> <span class="k"> * here, you lose a bit of ANSI conformance, but your programs will still</span>
<a name="61" /><span class="Maybe">      61:</span> <span class="k"> * work.</span>
<a name="62" /><span class="Maybe">      62:</span> <span class="k"> *</span>
<a name="63" /><span class="Maybe">      63:</span> <span class="k"> * NOTE: rune_t is not covered by ANSI nor other standards, and should not</span>
<a name="64" /><span class="Maybe">      64:</span> <span class="k"> * be instantiated outside of lib/libc/locale.  Use wchar_t.  wchar_t and</span>
<a name="65" /><span class="Maybe">      65:</span> <span class="k"> * rune_t must be the same type.  Also wint_t must be no narrower than</span>
<a name="66" /><span class="Maybe">      66:</span> <span class="k"> * wchar_t, and should also be able to hold all members of the largest</span>
<a name="67" /><span class="Maybe">      67:</span> <span class="k"> * character set plus one extra value (WEOF). wint_t must be at least 16 bits.</span>
<a name="68" /><span class="Maybe">      68:</span> <span class="k"> */</span>
<a name="69" /><span class="Maybe">      69:</span> 
<a name="70" /><span class="Maybe">      70:</span> <span class="m">typedef</span> <span class="m">int</span>            <span class="b">__darwin_ct_rune_t</span><span class="f">;</span>    <span class="k">/* ct_rune_t */</span>
<a name="71" /><span class="Maybe">      71:</span> 
<a name="72" /><span class="Maybe">      72:</span> <span class="k">/*</span>
<a name="73" /><span class="Maybe">      73:</span> <span class="k"> * mbstate_t is an opaque object to keep conversion state, during multibyte</span>
<a name="74" /><span class="Maybe">      74:</span> <span class="k"> * stream conversions.  The content must not be referenced by user programs.</span>
<a name="75" /><span class="Maybe">      75:</span> <span class="k"> */</span>
<a name="76" /><span class="Maybe">      76:</span> <span class="m">typedef</span> <span class="m">union</span> <span class="f">{</span>
<a name="77" /><span class="Maybe">      77:</span>     <span class="m">char</span>        <span class="b">__mbstate8</span><span class="f">[</span><span class="c">128</span><span class="f">]</span><span class="f">;</span>
<a name="78" /><span class="Maybe">      78:</span>     <span class="m">long</span> <span class="m">long</span>    <span class="b">_mbstateL</span><span class="f">;</span>            <span class="k">/* for alignment */</span>
<a name="79" /><span class="Maybe">      79:</span> <span class="f">}</span> <span class="b">__mbstate_t</span><span class="f">;</span>
<a name="80" /><span class="Maybe">      80:</span> 
<a name="81" /><span class="Maybe">      81:</span> <span class="m">typedef</span> <span class="b">__mbstate_t</span>        <span class="b">__darwin_mbstate_t</span><span class="f">;</span>    <span class="k">/* mbstate_t */</span>
<a name="82" /><span class="Maybe">      82:</span> 
<a name="83" /><span class="False">      83:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">__PTRDIFF_TYPE__</span><span class="f">)</span>
<a name="84" /><span class="False">      84:</span> <span class="m">typedef</span> <span class="b">__PTRDIFF_TYPE__</span>    <span class="b">__darwin_ptrdiff_t</span><span class="f">;</span>    <span class="k">/* ptr1 - ptr2 */</span>
<a name="85" /><span class="False">      85:</span> <span class="f">#</span><span class="n">elif</span> <span class="b">defined</span><span class="f">(</span><span class="b">__LP64__</span><span class="f">)</span>
<a name="86" /><span class="False">      86:</span> <span class="m">typedef</span> <span class="m">long</span>            <span class="b">__darwin_ptrdiff_t</span><span class="f">;</span>    <span class="k">/* ptr1 - ptr2 */</span>
<a name="87" /><span class="Maybe">      87:</span> <span class="f">#</span><span class="n">else</span>
<a name="88" /><span class="Maybe">      88:</span> <span class="m">typedef</span> <span class="m">int</span>            <span class="b">__darwin_ptrdiff_t</span><span class="f">;</span>    <span class="k">/* ptr1 - ptr2 */</span>
<a name="89" /><span class="Maybe">      89:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* __GNUC__ */</span>
<a name="90" /><span class="Maybe">      90:</span> 
<a name="91" /><span class="False">      91:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">__SIZE_TYPE__</span><span class="f">)</span>
<a name="92" /><span class="False">      92:</span> <span class="m">typedef</span> <span class="b">__SIZE_TYPE__</span>        <span class="b">__darwin_size_t</span><span class="f">;</span>    <span class="k">/* sizeof() */</span>
<a name="93" /><span class="Maybe">      93:</span> <span class="f">#</span><span class="n">else</span>
<a name="94" /><span class="Maybe">      94:</span> <span class="m">typedef</span> <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">__darwin_size_t</span><span class="f">;</span>    <span class="k">/* sizeof() */</span>
<a name="95" /><span class="Maybe">      95:</span> <span class="f">#</span><span class="n">endif</span>
<a name="96" /><span class="Maybe">      96:</span> 
<a name="97" /><span class="Maybe">      97:</span> <span class="f">#</span><span class="n">if</span> <span class="f">(</span><a href="macros_ref.html#_X19HTlVDX19fMA__"><span class="b">__GNUC__</span></a> <span class="f">&gt;</span> <span class="c">2</span><span class="f">)</span>
<a name="98" /><span class="Maybe">      98:</span> <span class="m">typedef</span> <span class="b">__builtin_va_list</span>    <span class="b">__darwin_va_list</span><span class="f">;</span>    <span class="k">/* va_list */</span>
<a name="99" /><span class="False">      99:</span> <span class="f">#</span><span class="n">else</span>
<a name="100" /><span class="False">     100:</span> <span class="m">typedef</span> <span class="m">void</span> <span class="f">*</span>            <span class="b">__darwin_va_list</span><span class="f">;</span>    <span class="k">/* va_list */</span>
<a name="101" /><span class="Maybe">     101:</span> <span class="f">#</span><span class="n">endif</span>
<a name="102" /><span class="Maybe">     102:</span> 
<a name="103" /><span class="False">     103:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">__WCHAR_TYPE__</span><span class="f">)</span>
<a name="104" /><span class="False">     104:</span> <span class="m">typedef</span> <span class="b">__WCHAR_TYPE__</span>        <span class="b">__darwin_wchar_t</span><span class="f">;</span>    <span class="k">/* wchar_t */</span>
<a name="105" /><span class="Maybe">     105:</span> <span class="f">#</span><span class="n">else</span>
<a name="106" /><span class="Maybe">     106:</span> <span class="m">typedef</span> <span class="b">__darwin_ct_rune_t</span>    <span class="b">__darwin_wchar_t</span><span class="f">;</span>    <span class="k">/* wchar_t */</span>
<a name="107" /><span class="Maybe">     107:</span> <span class="f">#</span><span class="n">endif</span>
<a name="108" /><span class="Maybe">     108:</span> 
<a name="109" /><span class="Maybe">     109:</span> <span class="m">typedef</span> <span class="b">__darwin_wchar_t</span>    <span class="b">__darwin_rune_t</span><span class="f">;</span>    <span class="k">/* rune_t */</span>
<a name="110" /><span class="Maybe">     110:</span> 
<a name="111" /><span class="False">     111:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">__WINT_TYPE__</span><span class="f">)</span>
<a name="112" /><span class="False">     112:</span> <span class="m">typedef</span> <span class="b">__WINT_TYPE__</span>        <span class="b">__darwin_wint_t</span><span class="f">;</span>    <span class="k">/* wint_t */</span>
<a name="113" /><span class="Maybe">     113:</span> <span class="f">#</span><span class="n">else</span>
<a name="114" /><span class="Maybe">     114:</span> <span class="m">typedef</span> <span class="b">__darwin_ct_rune_t</span>    <span class="b">__darwin_wint_t</span><span class="f">;</span>    <span class="k">/* wint_t */</span>
<a name="115" /><span class="Maybe">     115:</span> <span class="f">#</span><span class="n">endif</span>
<a name="116" /><span class="Maybe">     116:</span> 
<a name="117" /><span class="Maybe">     117:</span> <span class="m">typedef</span> <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">__darwin_clock_t</span><span class="f">;</span>    <span class="k">/* clock() */</span>
<a name="118" /><span class="Maybe">     118:</span> <span class="m">typedef</span> <span class="b">__uint32_t</span>        <span class="b">__darwin_socklen_t</span><span class="f">;</span>    <span class="k">/* socklen_t (duh) */</span>
<a name="119" /><span class="Maybe">     119:</span> <span class="m">typedef</span> <span class="m">long</span>            <span class="b">__darwin_ssize_t</span><span class="f">;</span>    <span class="k">/* byte count or error */</span>
<a name="120" /><span class="Maybe">     120:</span> <span class="m">typedef</span> <span class="m">long</span>            <span class="b">__darwin_time_t</span><span class="f">;</span>    <span class="k">/* time() */</span>
<a name="121" /><span class="Maybe">     121:</span> 
<a name="122" /><span class="True">     122:</span> <span class="f">#</span><span class="n">endif</span>    <span class="k">/* _BSD_I386__TYPES_H_ */</span>
<a name="123" /><span class="True">     123:</span> </pre>
  </body>
</html>
